
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpDtfLog.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpDtfLogForm"
 */
public class CcpDtfLogForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cdlGuid = null;
   private java.lang.String _opType = null;
   private java.lang.String _startTime = null;
   private java.lang.String _endTime = null;
   private java.lang.String _opState = null;
   private java.lang.String _opUser = null;
   private java.lang.String _fileName = null;
   private java.lang.String _fileSize = null;
   private java.lang.String _opLog = null;
   private java.lang.String _opService = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpDtfLogForm() {
   }

   /**
    * Returns the cdlGuid
    *
    * @return the cdlGuid
    */
   public java.lang.String getCdlGuid() {
      return _cdlGuid;
   }

   /**
    * Sets the cdlGuid
    *
    * @param cdlGuid the new cdlGuid value
    */
   public void setCdlGuid(java.lang.String cdlGuid) {
      _cdlGuid = cdlGuid;
   }
   /**
    * Returns the opType
    *
    * @return the opType
    */
   public java.lang.String getOpType() {
      return _opType;
   }

   /**
    * Sets the opType
    *
    * @param opType the new opType value
    */
   public void setOpType(java.lang.String opType) {
      _opType = opType;
   }
   /**
    * Returns the startTime
    *
    * @return the startTime
    */
   public java.lang.String getStartTime() {
      return _startTime;
   }

   /**
    * Sets the startTime
    *
    * @param startTime the new startTime value
    */
   public void setStartTime(java.lang.String startTime) {
      _startTime = startTime;
   }
   /**
    * Returns the endTime
    *
    * @return the endTime
    */
   public java.lang.String getEndTime() {
      return _endTime;
   }

   /**
    * Sets the endTime
    *
    * @param endTime the new endTime value
    */
   public void setEndTime(java.lang.String endTime) {
      _endTime = endTime;
   }
   /**
    * Returns the opState
    *
    * @return the opState
    */
   public java.lang.String getOpState() {
      return _opState;
   }

   /**
    * Sets the opState
    *
    * @param opState the new opState value
    */
   public void setOpState(java.lang.String opState) {
      _opState = opState;
   }
   /**
    * Returns the opUser
    *
    * @return the opUser
    */
   public java.lang.String getOpUser() {
      return _opUser;
   }

   /**
    * Sets the opUser
    *
    * @param opUser the new opUser value
    */
   public void setOpUser(java.lang.String opUser) {
      _opUser = opUser;
   }
   /**
    * Returns the fileName
    *
    * @return the fileName
    */
   public java.lang.String getFileName() {
      return _fileName;
   }

   /**
    * Sets the fileName
    *
    * @param fileName the new fileName value
    */
   public void setFileName(java.lang.String fileName) {
      _fileName = fileName;
   }
   /**
    * Returns the fileSize
    *
    * @return the fileSize
    */
   public java.lang.String getFileSize() {
      return _fileSize;
   }

   /**
    * Sets the fileSize
    *
    * @param fileSize the new fileSize value
    */
   public void setFileSize(java.lang.String fileSize) {
      _fileSize = fileSize;
   }
   /**
    * Returns the opLog
    *
    * @return the opLog
    */
   public java.lang.String getOpLog() {
      return _opLog;
   }

   /**
    * Sets the opLog
    *
    * @param opLog the new opLog value
    */
   public void setOpLog(java.lang.String opLog) {
      _opLog = opLog;
   }
   /**
    * Returns the opService
    *
    * @return the opService
    */
   public java.lang.String getOpService() {
      return _opService;
   }

   /**
    * Sets the opService
    *
    * @param opService the new opService value
    */
   public void setOpService(java.lang.String opService) {
      _opService = opService;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCdlGuid() == null) {
         errors.add("cdlGuid", new ActionError("error.cdlGuid.required"));
      }
      if(getOpType() == null) {
         errors.add("opType", new ActionError("error.opType.required"));
      }
      // TODO test format/data
      return errors;
   }
}
